home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / copy < prev    next >
Text File  |  1999-03-31  |  629b  |  25 lines

  1. SYNOPSIS
  2.         mixed copy (mixed arg)
  3.  
  4. DESCRIPTION
  5.         Create a shallow copy of <arg> and return it. For arrays and mappings
  6.         this means that a new array or mapping is created with copies of the
  7.         original content. Embedded arrays and mappings are copied by reference!
  8.  
  9.         For other values this function is a no-op.
  10.  
  11. EXAMPLE
  12.         mixed *a, *b;
  13.  
  14.         a = ({ 1, ({ 21, 22 }) });
  15.         b = copy(a);
  16.         a[0] = -1; a[1][0] = -21;
  17.          --> a is now ({ -1, ({ -21, 22 }) })
  18.              b is now ({  1, ({ -21, 22 }) })
  19.  
  20. HISTORY
  21.         Introduced in LDMud 3.2.6.
  22.  
  23. SEE ALSO
  24.         deep_copy(E)
  25.